<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
    <%- include('partials/header') %>
    <div class="container">
        <h2>用户管理</h2>
        <a href="/users/add">添加新用户</a>
        <table>
            <thead>
                <tr>
                    <th>ID</th>
                    <th>用户名</th>
                    <th>邮箱</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <% users.forEach(user => { %>
                    <tr>
                        <td><%= user.id %></td>
                        <td><%= user.username %></td>
                        <td><%= user.email %></td>
                        <td>
                            <a href="/users/edit/<%= user.id %>">编辑</a>
                            <a href="/users/delete/<%= user.id %>">删除</a>
                        </td>
                    </tr>
                <% }) %>
            </tbody>
        </table>
    </div>
    <%- include('partials/footer') %>
</body>
</html>